import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import { Link } from 'react-router';
import { Button } from 'antd';
import Ajax from 'lib/Ajax';
import List from 'mixin/list';

@inject('appStore', 'languageStore')
@observer
class ModuleName extends Component {
	constructor(props) {
    super(props);
		
    this.state = Object.assign({
			bannerList: [{
        url: 'javascript:',
        img: 'http://img62.ddimg.cn/picc/1yfd-750-234.jpg',
        title: 'xx'
      }, {
        url: 'javascript:',
        img: 'http://img62.ddimg.cn/picc/1yfd-750-234.jpg',
        title: 'xx'
      }, {
        url: 'javascript:',
        img: 'http://img62.ddimg.cn/picc/1yfd-750-234.jpg',
        title: 'xx'
      }]
    }, this.state)

		this.listApi = '/school/list';
  }

  // componentDidMount(){
	// 	this.fetchSchool(1)
  // }

	renderRow = (rowData, sectionID, rowID)=>{
    const { imgBaseUrl, commonData } = this.props.appStore;
    return (
        <div key={rowID} className="activity-item">
          <Link to={`/school/${rowData.schoolId}`}>
            <img src={`${imgBaseUrl}${rowData.listImg}`} alt=""/>
            <div className="row-text">
              <div className="t">{rowData.name}</div>
              <div className="b">
                {this.props.appStore.getNameById('countryEn', rowData.countryId)}
              </div>
            </div>
          </Link>
        </div>
      );
  }

  render() {
    const homeData = this.props.languageStore.getPageData('home');
		const { imgBaseUrl, commonData } = this.props.appStore;

    return (
    	<div className="home">
        xxx
    	</div>
    )
  }
}

module.exports = ModuleName
